﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" Inherits="Manager_OrderManager" Codebehind="order.aspx.cs" %>
<%@ Register assembly="obout_Grid_NET" namespace="Obout.Grid" tagprefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <p>
        <br />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Label ID="Label7" runat="server" Font-Bold="True" Font-Names="Arial" 
            Font-Size="Large" ForeColor="Blue" Text="Danh sách &#273;&#417;n &#273;&#7863;t hàng"></asp:Label>
    </p>
    <p>
        &nbsp;</p>
    <asp:SqlDataSource ID="SqlDS1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        SelectCommand="Select  HOA_DON.id as 'ID', ndh.Ten as 'NguoiDatHang', 
		NgayDatHang as 'NgayDatHang',
		nxn.Ten as 'NguoiXacNhan', NgayXacNhan as 'NgayXacNhan',
		TongTien as 'TongTien'
        From HOA_DON, NGUOI_DUNG ndh, NGUOI_DUNG nxn
        Where ndh.id = NguoiDatHang and nxn.id = NguoiXacNhan">
    </asp:SqlDataSource>
    <asp:Label ID="Label21" runat="server" BackColor="#FFFFCC" Font-Bold="True" 
        Font-Size="Medium" ForeColor="Blue" Height="20px" Text="Danh sách hóa &#273;&#417;n &#273;ã xác nh&#7853;n" 
        Width="585px"></asp:Label>
    <cc1:Grid ID="Grid1" runat="server" DataSourceID="SqlDS1" 
        AllowAddingRecords="False" onselect="Grid1_Select" 
        AutoPostBackOnSelect="True" EnableRecordHover="True" 
        AutoGenerateColumns="False">
         <Columns>
            <cc1:Column DataField="ID" HeaderText="ID"  Width="50"  runat="server"/>
            <cc1:Column DataField="NguoiDatHang" HeaderText="Ng&#432;&#7901;i &#273;&#7863;t hàng" Width="109"  Wrap="true" runat="server"/>
            <cc1:Column DataField="NgayDatHang" HeaderText="Ngày &#273;&#7863;t hàng" Width="109"  Wrap="true" runat="server"/>
            <cc1:Column DataField="NguoiXacNhan" HeaderText="Ng&#432;&#7901;i xác nhân" Width="109"  Wrap="true" runat="server"/>
            <cc1:Column DataField="NgayXacNhan" HeaderText="Ngày xác nh&#7853;n" Width="109"  Wrap="true" runat="server"/>
            <cc1:Column DataField="TongTien" HeaderText="T&#7893;ng Ti&#7873;n" Width="100"  Wrap="true" runat="server">
                <TemplateSettings TemplateId="GiaTienTemplate2" />
            </cc1:Column>
        </Columns>
        <Templates>	        
            <cc1:GridTemplate runat="server" ID="GiaTienTemplate2">
                <Template>
                    <%# E2_WEBSITE.Code.Utilities.ConvertToMoneyFormat(int.Parse(Container.Value.ToString()), true)%>
                </Template>
            </cc1:GridTemplate>
        </Templates>
    </cc1:Grid>
    <p>
    </p>
    <br />
    <br />
    <asp:SqlDataSource ID="SqlDS2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        SelectCommand="Select  HOA_DON.id as 'ID', ndh.Ten as 'NguoiDatHang', 
		NgayDatHang as 'NgayDatHang',
		TongTien as 'TongTien'
        From HOA_DON, NGUOI_DUNG ndh
        Where NguoiXacNhan is NULL and ndh.id = NguoiDatHang">
    </asp:SqlDataSource>
    <asp:Label ID="Label1" runat="server" BackColor="#FFFFCC" Font-Bold="True" 
        Font-Size="Medium" ForeColor="Blue" Height="20px" Text="Danh sách hóa &#273;&#417;n ch&#432;a xác nh&#7853;n" 
        Width="585px"></asp:Label>
    <cc1:Grid ID="Grid2" runat="server" DataSourceID="SqlDS2" 
        AllowAddingRecords="False" onselect="Grid1_Select" 
        AutoPostBackOnSelect="True" EnableRecordHover="True" 
        AutoGenerateColumns="False">
         <Columns>
            <cc1:Column ID="Column1" DataField="ID" HeaderText="ID"  Width="70"  runat="server"/>
            <cc1:Column ID="Column2" DataField="NguoiDatHang" HeaderText="Ng&#432;&#7901;i &#273;&#7863;t hàng" Width="190"  Wrap="true" runat="server"/>
            <cc1:Column ID="Column3" DataField="NgayDatHang" HeaderText="Ngày &#273;&#7863;t hàng" Width="190"  Wrap="true" runat="server"/>
            <cc1:Column ID="Column6" DataField="TongTien" HeaderText="T&#7893;ng Ti&#7873;n" Width="135"  Wrap="true" runat="server">
            <TemplateSettings TemplateId="GiaTienTemplate1" />
            </cc1:Column>
        </Columns>
        
        <Templates>	        
        <cc1:GridTemplate runat="server" ID="GiaTienTemplate1">
            <Template>
                <%# E2_WEBSITE.Code.Utilities.ConvertToMoneyFormat(int.Parse(Container.Value.ToString()), true)%>
            </Template>
        </cc1:GridTemplate>
        </Templates>
    </cc1:Grid>
    </asp:Content>

